package com.zhang.apipassenger.remote;

import com.zhang.apipassenger.request.OrderRequest;
import com.zhang.internalcommon.dto.OrderInfo;
import com.zhang.internalcommon.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * 类功能描述
 *
 * @author Kye
 * @date 2025-04-16
 */
@FeignClient("service-order")
public interface ServiceOrderClient {
	@PostMapping("/order/add")
	public ResponseResult addOrder(@RequestBody OrderRequest orderRequest);

	@GetMapping("/test-real-time-order/{orderId}")
	public String dispatchRealTimeOrder(@PathVariable("orderId") long orderId);

	@PostMapping("/order/cancel")
	public ResponseResult cancel(@RequestParam Long orderId, @RequestParam String identity);

	@PostMapping("/book")
	public ResponseResult book(@RequestBody OrderRequest orderRequest);

	@GetMapping("/detail")
	public ResponseResult<OrderInfo> detail(@RequestParam Long orderId);

	@GetMapping("/current")
	public ResponseResult current(@RequestParam String phone, @RequestParam String identity);
}
